import { BaseEntity } from '@cool-midway/core';
import { Column, Entity } from 'typeorm';

/**
 * 评论
 */
@Entity('app_comments')
export class CommentsEntity extends BaseEntity {
    @Column({ comment: '文章ID', type: 'int', nullable: true })
    articleId: number;

    @Column({ comment: '父ID', type: 'int', nullable: true })
    pid: number;

    @Column({ comment: '用户ID', type: 'int' })
    userId: number;

    @Column({ comment: '回复用户ID', type: 'int', nullable: true })
    toUserId: number;

    @Column({ comment: '评论内容', type: 'varchar', length: 255 })
    content: string;
}
